package formBean;

import java.util.ArrayList;
import java.util.List;

import org.mybeans.form.FormBean;

public class CustomerNameForm extends FormBean {
	private String username;
	private String id;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public List<String> getValidationErrors() {
        List<String> errors = new ArrayList<String>();
        
        if (username == null || username.length() == 0) errors.add("User Name is required");
		
	    if (errors.size() > 0) return errors;
		
		return errors;
    }
}
